﻿namespace Microsoft.SharePoint.Client
{
    using System;
    using System.Xml;

    public abstract class ClientAction
    {
        private long m_id;
        private string m_name;
        private ObjectPath m_objectPath;

        protected ClientAction(ObjectPath objectPath, string name)
        {
            this.m_objectPath = objectPath;
            this.m_name = name;
            this.m_id = ClientRequest.NextSequenceId;
        }

        internal abstract void WriteToXml(XmlWriter writer, SerializationContext serializationContext);

        public long Id
        {
            get
            {
                return this.m_id;
            }
        }

        public string Name
        {
            get
            {
                return this.m_name;
            }
        }

        public ObjectPath Path
        {
            get
            {
                return this.m_objectPath;
            }
        }
    }
}

